import Vue from 'vue';
import VueRouter from 'vue-router';
import PageRouter from './page/'; // 页面路由
import Store from '../store/'; // vuex

Vue.use(VueRouter);

//创建路由
const createRouter = () =>
	new VueRouter({
		routes: [ ...PageRouter ]
	});

// Router.$avueRouter.formatRoutes(Store.state.user.menuAll, true); // 动态路由核心方法

const Router = createRouter(); // 获得 route 实例

export default Router;
